<template>
  <div class="empty-page">
    <van-empty :image="props.image" :description="description" />
  </div>
</template>

<script lang="ts">
export default {
  name: 'EmptyPage'
}
</script>

<script setup lang="ts">
const props = defineProps({
  image: {
    type: String,
    default: 'https://img.yzcdn.cn/vant/empty-image-default.png'
  },
  description: {
    type: String,
    default: '暂无数据'
  }
})
</script>

<style lang="scss" scoped>
.empty-page {
  position: relative;
  height: 400px;
}
.van-empty {
  position: absolute;
  width: 100%;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  :deep(.van-empty__description) {
    padding: unset;
  }
}
</style>
